package com.example.a02back.controller;

import com.example.a02back.entity.User;
import com.example.a02back.mapper.UserMapper;
import com.example.a02back.service.impl.UserServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName TestController
 * @Description
 * @Author SimpChaos
 * @Date 2022/7/5 14:55
 * @Version 1.0
 **/

@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    private UserServiceImpl userService;
    @Resource
    private UserMapper userMapper;


    @RequestMapping("/test1")
    public String text(){

        User user = new User();
        user.setOid("24242");
        user.setAvatarUrl("123213");
        user.setGender("0");
        user.setNickname("test");
        user.setUid("2757273");
        System.out.print(1);
        userMapper.insert(user);
        System.out.print(2);
        return "nihao";

    }
}
